package com.dlshouwen.core.base.listener;

import javax.servlet.ServletContextEvent;
import javax.servlet.ServletContextListener;

import org.apache.log4j.Logger;

/**
 * 服务启动监听加载版权信息
 * @author cuixubin
 */
public class CopyrightListener implements ServletContextListener{
	
	/** 日志记录对象 */
	private Logger logger = Logger.getLogger(CopyrightListener.class);
	
	/**
	 * 监听启动方法
	 * <p>输出版权信息
	 * @param servletContextEvent Servlet上下文事件
	 */
	public void contextInitialized(ServletContextEvent servletContextEvent) {
		logger.info("%*******************************************%");
		logger.info("*     COMMON-WEBSITE-BACKGROUND-SYSTEM      *");
		logger.info("*      Copyright (c) CUIXUBIN PRIVATE       *");
		logger.info("*             QQ: 1994930998                *");
		logger.info("*             WeChat: woaimo                *");
		logger.info("%*******************************************%");
	}
	
	/**
	 * 监听失效方法
	 * @param servletContextEvent Servlet上下文事件
	 */
	public void contextDestroyed(ServletContextEvent servletContextEvent) {
	}

}
